<template>
  <h2>路由基础</h2>
  <p>
    <!-- RouterLink相当于a标签 -->
    <RouterLink to="/movies">电影</RouterLink> |
    <RouterLink to="/videos">视频</RouterLink> |
    <RouterLink to="/mine">我的</RouterLink> |
    <RouterLink to="/detail/123">详情1</RouterLink> |
    <RouterLink to="/detail/456">详情2</RouterLink> |
    <RouterLink to="/users/zhangsan">用户</RouterLink> |
    <RouterLink to="/other">其他</RouterLink> |
  </p>

  <!-- RouterView相当于切换内容的容器 -->
  <RouterView />
  <RouterView name="other1" />
  <RouterView name="abc" />
</template>

<style scoped>
.router-link-active {
  color: red;
}
</style>
